package com.start.mc;

import java.util.HashMap;
import java.util.Map;

public class MCStop {
    public static String stop(String token, String server, String sec, String cookie) {
        MyRequest myRequest = new MyRequest();

        // 构造请求头
        Map<String, String> headers = new HashMap<>();
        headers.put("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
                + "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36 Edg/140.0.0.0");
        headers.put("referer", "https://aternos.org/server/");
        headers.put("accept-language", "zh");
        headers.put("Cookie", cookie);

        String url = "https://aternos.org/ajax/server/stop?"
                + "SEC=" + sec
                + "&TOKEN=" + token
                + "&SERVER=" + server;

        return myRequest.get(url, headers);
    }
}


